3.76 \(\int \frac{\csc ^4(c+d x)}{(a+b \tan (c+d x))^4} \, dx\)

Optimal. Leaf size=205 \[ -\frac{b \left (3 a^2+10 b^2\right )}{a^6 d (a+b \tan (c+d x))}-\frac{b \left (a^2+2 b^2\right )}{a^5 d (a+b \tan (c+d x))^2}-\frac{b \left (a^2+b^2\right )}{3 a^4 d (a+b \tan (c+d x))^3}-\frac{\left (a^2+10 b^2\right ) \cot (c+d x)}{a^6 d}-\frac{4 b \left (a^2+5 b^2\right ) \log (\tan (c+d x))}{a^7 d}+\frac{4 b \left (a^2+5 b^2\right ) \log (a+b \tan (c+d x))}{a^7 d}+\frac{2 b \cot ^2(c+d x)}{a^5 d}-\frac{\cot ^3(c+d x)}{3 a^4 d} \]

[Out]

-(((a^2 + 10*b^2)*Cot[c + d*x])/(a^6*d)) + (2*b*Cot[c + d*x]^2)/(a^5*d) - Cot[c + d*x]^3/(3*a^4*d) - (4*b*(a^2
 + 5*b^2)*Log[Tan[c + d*x]])/(a^7*d) + (4*b*(a^2 + 5*b^2)*Log[a + b*Tan[c + d*x]])/(a^7*d) - (b*(a^2 + b^2))/(
3*a^4*d*(a + b*Tan[c + d*x])^3) - (b*(a^2 + 2*b^2))/(a^5*d*(a + b*Tan[c + d*x])^2) - (b*(3*a^2 + 10*b^2))/(a^6
*d*(a + b*Tan[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.173254, antiderivative size = 205, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3516, 894} \[ -\frac{b \left (3 a^2+10 b^2\right )}{a^6 d (a+b \tan (c+d x))}-\frac{b \left (a^2+2 b^2\right )}{a^5 d (a+b \tan (c+d x))^2}-\frac{b \left (a^2+b^2\right )}{3 a^4 d (a+b \tan (c+d x))^3}-\frac{\left (a^2+10 b^2\right ) \cot (c+d x)}{a^6 d}-\frac{4 b \left (a^2+5 b^2\right ) \log (\tan (c+d x))}{a^7 d}+\frac{4 b \left (a^2+5 b^2\right ) \log (a+b \tan (c+d x))}{a^7 d}+\frac{2 b \cot ^2(c+d x)}{a^5 d}-\frac{\cot ^3(c+d x)}{3 a^4 d} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^4/(a + b*Tan[c + d*x])^4,x]

[Out]

-(((a^2 + 10*b^2)*Cot[c + d*x])/(a^6*d)) + (2*b*Cot[c + d*x]^2)/(a^5*d) - Cot[c + d*x]^3/(3*a^4*d) - (4*b*(a^2
 + 5*b^2)*Log[Tan[c + d*x]])/(a^7*d) + (4*b*(a^2 + 5*b^2)*Log[a + b*Tan[c + d*x]])/(a^7*d) - (b*(a^2 + b^2))/(
3*a^4*d*(a + b*Tan[c + d*x])^3) - (b*(a^2 + 2*b^2))/(a^5*d*(a + b*Tan[c + d*x])^2) - (b*(3*a^2 + 10*b^2))/(a^6
*d*(a + b*Tan[c + d*x]))

Rule 3516

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[b/f, Subst[Int
[(x^m*(a + x)^n)/(b^2 + x^2)^(m/2 + 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/
2]

Rule 894

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && IntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rubi steps

\begin{align*} \int \frac{\csc ^4(c+d x)}{(a+b \tan (c+d x))^4} \, dx &=\frac{b \operatorname{Subst}\left (\int \frac{b^2+x^2}{x^4 (a+x)^4} \, dx,x,b \tan (c+d x)\right )}{d}\\ &=\frac{b \operatorname{Subst}\left (\int \left (\frac{b^2}{a^4 x^4}-\frac{4 b^2}{a^5 x^3}+\frac{a^2+10 b^2}{a^6 x^2}-\frac{4 \left (a^2+5 b^2\right )}{a^7 x}+\frac{a^2+b^2}{a^4 (a+x)^4}+\frac{2 \left (a^2+2 b^2\right )}{a^5 (a+x)^3}+\frac{3 a^2+10 b^2}{a^6 (a+x)^2}+\frac{4 \left (a^2+5 b^2\right )}{a^7 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{d}\\ &=-\frac{\left (a^2+10 b^2\right ) \cot (c+d x)}{a^6 d}+\frac{2 b \cot ^2(c+d x)}{a^5 d}-\frac{\cot ^3(c+d x)}{3 a^4 d}-\frac{4 b \left (a^2+5 b^2\right ) \log (\tan (c+d x))}{a^7 d}+\frac{4 b \left (a^2+5 b^2\right ) \log (a+b \tan (c+d x))}{a^7 d}-\frac{b \left (a^2+b^2\right )}{3 a^4 d (a+b \tan (c+d x))^3}-\frac{b \left (a^2+2 b^2\right )}{a^5 d (a+b \tan (c+d x))^2}-\frac{b \left (3 a^2+10 b^2\right )}{a^6 d (a+b \tan (c+d x))}\\ \end{align*}

Mathematica [B]  time = 2.03439, size = 528, normalized size = 2.58 \[ \frac{\sec ^4(c+d x) (a \cos (c+d x)+b \sin (c+d x)) \left (-192 b \left (a^2+5 b^2\right ) \log (\sin (c+d x)) (a \cos (c+d x)+b \sin (c+d x))^3+192 b \left (a^2+5 b^2\right ) (a \cos (c+d x)+b \sin (c+d x))^3 \log (a \cos (c+d x)+b \sin (c+d x))-\frac{\csc ^3(c+d x) \left (3 a^5 b^3 \sin (2 (c+d x))+84 a^5 b^3 \sin (4 (c+d x))-65 a^5 b^3 \sin (6 (c+d x))-75 a^3 b^5 \sin (2 (c+d x))+156 a^3 b^5 \sin (4 (c+d x))-79 a^3 b^5 \sin (6 (c+d x))-22 a^6 b^2 \cos (6 (c+d x))+17 a^4 b^4 \cos (6 (c+d x))+55 a^2 b^6 \cos (6 (c+d x))+3 \left (10 a^6 b^2+45 a^4 b^4+115 a^2 b^6+3 a^8+75 b^8\right ) \cos (2 (c+d x))+6 \left (-35 a^2 b^6-17 a^4 b^4+2 a^6 b^2-15 b^8\right ) \cos (4 (c+d x))-4 a^6 b^2-50 a^4 b^4-190 a^2 b^6-3 a^7 b \sin (2 (c+d x))-6 a^7 b \sin (4 (c+d x))-3 a^7 b \sin (6 (c+d x))+a^8 (-\cos (6 (c+d x)))+8 a^8-75 a b^7 \sin (2 (c+d x))+60 a b^7 \sin (4 (c+d x))-15 a b^7 \sin (6 (c+d x))+15 b^8 \cos (6 (c+d x))-150 b^8\right )}{a^2+b^2}\right )}{48 a^7 d (a+b \tan (c+d x))^4} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^4/(a + b*Tan[c + d*x])^4,x]

[Out]

(Sec[c + d*x]^4*(a*Cos[c + d*x] + b*Sin[c + d*x])*(-192*b*(a^2 + 5*b^2)*Log[Sin[c + d*x]]*(a*Cos[c + d*x] + b*
Sin[c + d*x])^3 + 192*b*(a^2 + 5*b^2)*Log[a*Cos[c + d*x] + b*Sin[c + d*x]]*(a*Cos[c + d*x] + b*Sin[c + d*x])^3
 - (Csc[c + d*x]^3*(8*a^8 - 4*a^6*b^2 - 50*a^4*b^4 - 190*a^2*b^6 - 150*b^8 + 3*(3*a^8 + 10*a^6*b^2 + 45*a^4*b^
4 + 115*a^2*b^6 + 75*b^8)*Cos[2*(c + d*x)] + 6*(2*a^6*b^2 - 17*a^4*b^4 - 35*a^2*b^6 - 15*b^8)*Cos[4*(c + d*x)]
 - a^8*Cos[6*(c + d*x)] - 22*a^6*b^2*Cos[6*(c + d*x)] + 17*a^4*b^4*Cos[6*(c + d*x)] + 55*a^2*b^6*Cos[6*(c + d*
x)] + 15*b^8*Cos[6*(c + d*x)] - 3*a^7*b*Sin[2*(c + d*x)] + 3*a^5*b^3*Sin[2*(c + d*x)] - 75*a^3*b^5*Sin[2*(c +
d*x)] - 75*a*b^7*Sin[2*(c + d*x)] - 6*a^7*b*Sin[4*(c + d*x)] + 84*a^5*b^3*Sin[4*(c + d*x)] + 156*a^3*b^5*Sin[4
*(c + d*x)] + 60*a*b^7*Sin[4*(c + d*x)] - 3*a^7*b*Sin[6*(c + d*x)] - 65*a^5*b^3*Sin[6*(c + d*x)] - 79*a^3*b^5*
Sin[6*(c + d*x)] - 15*a*b^7*Sin[6*(c + d*x)]))/(a^2 + b^2)))/(48*a^7*d*(a + b*Tan[c + d*x])^4)

________________________________________________________________________________________

Maple [A]  time = 0.198, size = 278, normalized size = 1.4 \begin{align*} -{\frac{1}{3\,d{a}^{4} \left ( \tan \left ( dx+c \right ) \right ) ^{3}}}-{\frac{1}{d{a}^{4}\tan \left ( dx+c \right ) }}-10\,{\frac{{b}^{2}}{d{a}^{6}\tan \left ( dx+c \right ) }}+2\,{\frac{b}{d{a}^{5} \left ( \tan \left ( dx+c \right ) \right ) ^{2}}}-4\,{\frac{b\ln \left ( \tan \left ( dx+c \right ) \right ) }{d{a}^{5}}}-20\,{\frac{{b}^{3}\ln \left ( \tan \left ( dx+c \right ) \right ) }{d{a}^{7}}}-3\,{\frac{b}{d{a}^{4} \left ( a+b\tan \left ( dx+c \right ) \right ) }}-10\,{\frac{{b}^{3}}{d{a}^{6} \left ( a+b\tan \left ( dx+c \right ) \right ) }}-{\frac{b}{3\,{a}^{2}d \left ( a+b\tan \left ( dx+c \right ) \right ) ^{3}}}-{\frac{{b}^{3}}{3\,d{a}^{4} \left ( a+b\tan \left ( dx+c \right ) \right ) ^{3}}}-{\frac{b}{{a}^{3}d \left ( a+b\tan \left ( dx+c \right ) \right ) ^{2}}}-2\,{\frac{{b}^{3}}{d{a}^{5} \left ( a+b\tan \left ( dx+c \right ) \right ) ^{2}}}+4\,{\frac{b\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{d{a}^{5}}}+20\,{\frac{{b}^{3}\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{d{a}^{7}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^4/(a+b*tan(d*x+c))^4,x)

[Out]

-1/3/d/a^4/tan(d*x+c)^3-1/d/a^4/tan(d*x+c)-10/d/a^6/tan(d*x+c)*b^2+2/d/a^5*b/tan(d*x+c)^2-4*b*ln(tan(d*x+c))/a
^5/d-20/d*b^3/a^7*ln(tan(d*x+c))-3*b/a^4/d/(a+b*tan(d*x+c))-10/d*b^3/a^6/(a+b*tan(d*x+c))-1/3*b/a^2/d/(a+b*tan
(d*x+c))^3-1/3/d*b^3/a^4/(a+b*tan(d*x+c))^3-b/a^3/d/(a+b*tan(d*x+c))^2-2/d*b^3/a^5/(a+b*tan(d*x+c))^2+4*b*ln(a
+b*tan(d*x+c))/a^5/d+20/d*b^3/a^7*ln(a+b*tan(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.12349, size = 308, normalized size = 1.5 \begin{align*} \frac{\frac{3 \, a^{4} b \tan \left (d x + c\right ) - 12 \,{\left (a^{2} b^{3} + 5 \, b^{5}\right )} \tan \left (d x + c\right )^{5} - a^{5} - 30 \,{\left (a^{3} b^{2} + 5 \, a b^{4}\right )} \tan \left (d x + c\right )^{4} - 22 \,{\left (a^{4} b + 5 \, a^{2} b^{3}\right )} \tan \left (d x + c\right )^{3} - 3 \,{\left (a^{5} + 5 \, a^{3} b^{2}\right )} \tan \left (d x + c\right )^{2}}{a^{6} b^{3} \tan \left (d x + c\right )^{6} + 3 \, a^{7} b^{2} \tan \left (d x + c\right )^{5} + 3 \, a^{8} b \tan \left (d x + c\right )^{4} + a^{9} \tan \left (d x + c\right )^{3}} + \frac{12 \,{\left (a^{2} b + 5 \, b^{3}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{7}} - \frac{12 \,{\left (a^{2} b + 5 \, b^{3}\right )} \log \left (\tan \left (d x + c\right )\right )}{a^{7}}}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^4/(a+b*tan(d*x+c))^4,x, algorithm="maxima")

[Out]

1/3*((3*a^4*b*tan(d*x + c) - 12*(a^2*b^3 + 5*b^5)*tan(d*x + c)^5 - a^5 - 30*(a^3*b^2 + 5*a*b^4)*tan(d*x + c)^4
 - 22*(a^4*b + 5*a^2*b^3)*tan(d*x + c)^3 - 3*(a^5 + 5*a^3*b^2)*tan(d*x + c)^2)/(a^6*b^3*tan(d*x + c)^6 + 3*a^7
*b^2*tan(d*x + c)^5 + 3*a^8*b*tan(d*x + c)^4 + a^9*tan(d*x + c)^3) + 12*(a^2*b + 5*b^3)*log(b*tan(d*x + c) + a
)/a^7 - 12*(a^2*b + 5*b^3)*log(tan(d*x + c))/a^7)/d

________________________________________________________________________________________

Fricas [B]  time = 3.25469, size = 2732, normalized size = 13.33 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^4/(a+b*tan(d*x+c))^4,x, algorithm="fricas")

[Out]

1/3*(19*a^6*b^4 + 51*a^4*b^6 + 30*a^2*b^8 + 2*(a^10 + 23*a^8*b^2 - 22*a^6*b^4 - 138*a^4*b^6 - 90*a^2*b^8)*cos(
d*x + c)^6 - 3*(a^10 + 25*a^8*b^2 - 46*a^6*b^4 - 206*a^4*b^6 - 130*a^2*b^8)*cos(d*x + c)^4 + 3*(9*a^8*b^2 - 38
*a^6*b^4 - 131*a^4*b^6 - 80*a^2*b^8)*cos(d*x + c)^2 + 6*(a^6*b^4 + 7*a^4*b^6 + 11*a^2*b^8 + 5*b^10 + (3*a^8*b^
2 + 20*a^6*b^4 + 26*a^4*b^6 + 4*a^2*b^8 - 5*b^10)*cos(d*x + c)^6 - 3*(2*a^8*b^2 + 13*a^6*b^4 + 15*a^4*b^6 - a^
2*b^8 - 5*b^10)*cos(d*x + c)^4 + 3*(a^8*b^2 + 6*a^6*b^4 + 4*a^4*b^6 - 6*a^2*b^8 - 5*b^10)*cos(d*x + c)^2 - ((a
^9*b + 4*a^7*b^3 - 10*a^5*b^5 - 28*a^3*b^7 - 15*a*b^9)*cos(d*x + c)^5 - (a^9*b + a^7*b^3 - 31*a^5*b^5 - 61*a^3
*b^7 - 30*a*b^9)*cos(d*x + c)^3 - 3*(a^7*b^3 + 7*a^5*b^5 + 11*a^3*b^7 + 5*a*b^9)*cos(d*x + c))*sin(d*x + c))*l
og(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 + b^2) - 6*(a^6*b^4 + 7*a^4*b^6 + 11*a^2*b^8 +
 5*b^10 + (3*a^8*b^2 + 20*a^6*b^4 + 26*a^4*b^6 + 4*a^2*b^8 - 5*b^10)*cos(d*x + c)^6 - 3*(2*a^8*b^2 + 13*a^6*b^
4 + 15*a^4*b^6 - a^2*b^8 - 5*b^10)*cos(d*x + c)^4 + 3*(a^8*b^2 + 6*a^6*b^4 + 4*a^4*b^6 - 6*a^2*b^8 - 5*b^10)*c
os(d*x + c)^2 - ((a^9*b + 4*a^7*b^3 - 10*a^5*b^5 - 28*a^3*b^7 - 15*a*b^9)*cos(d*x + c)^5 - (a^9*b + a^7*b^3 -
31*a^5*b^5 - 61*a^3*b^7 - 30*a*b^9)*cos(d*x + c)^3 - 3*(a^7*b^3 + 7*a^5*b^5 + 11*a^3*b^7 + 5*a*b^9)*cos(d*x +
c))*sin(d*x + c))*log(-1/4*cos(d*x + c)^2 + 1/4) + (2*(3*a^9*b + 77*a^7*b^3 + 142*a^5*b^5 + 34*a^3*b^7 - 30*a*
b^9)*cos(d*x + c)^5 - (3*a^9*b + 193*a^7*b^3 + 350*a^5*b^5 + 26*a^3*b^7 - 120*a*b^9)*cos(d*x + c)^3 + 3*(15*a^
7*b^3 + 23*a^5*b^5 - 14*a^3*b^7 - 20*a*b^9)*cos(d*x + c))*sin(d*x + c))/((3*a^13*b + 5*a^11*b^3 + a^9*b^5 - a^
7*b^7)*d*cos(d*x + c)^6 - 3*(2*a^13*b + 3*a^11*b^3 - a^7*b^7)*d*cos(d*x + c)^4 + 3*(a^13*b + a^11*b^3 - a^9*b^
5 - a^7*b^7)*d*cos(d*x + c)^2 + (a^11*b^3 + 2*a^9*b^5 + a^7*b^7)*d - ((a^14 - a^12*b^2 - 5*a^10*b^4 - 3*a^8*b^
6)*d*cos(d*x + c)^5 - (a^14 - 4*a^12*b^2 - 11*a^10*b^4 - 6*a^8*b^6)*d*cos(d*x + c)^3 - 3*(a^12*b^2 + 2*a^10*b^
4 + a^8*b^6)*d*cos(d*x + c))*sin(d*x + c))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**4/(a+b*tan(d*x+c))**4,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.33433, size = 300, normalized size = 1.46 \begin{align*} -\frac{\frac{12 \,{\left (a^{2} b + 5 \, b^{3}\right )} \log \left ({\left | \tan \left (d x + c\right ) \right |}\right )}{a^{7}} - \frac{12 \,{\left (a^{2} b^{2} + 5 \, b^{4}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{7} b} + \frac{12 \, a^{2} b^{3} \tan \left (d x + c\right )^{5} + 60 \, b^{5} \tan \left (d x + c\right )^{5} + 30 \, a^{3} b^{2} \tan \left (d x + c\right )^{4} + 150 \, a b^{4} \tan \left (d x + c\right )^{4} + 22 \, a^{4} b \tan \left (d x + c\right )^{3} + 110 \, a^{2} b^{3} \tan \left (d x + c\right )^{3} + 3 \, a^{5} \tan \left (d x + c\right )^{2} + 15 \, a^{3} b^{2} \tan \left (d x + c\right )^{2} - 3 \, a^{4} b \tan \left (d x + c\right ) + a^{5}}{{\left (b \tan \left (d x + c\right )^{2} + a \tan \left (d x + c\right )\right )}^{3} a^{6}}}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^4/(a+b*tan(d*x+c))^4,x, algorithm="giac")

[Out]

-1/3*(12*(a^2*b + 5*b^3)*log(abs(tan(d*x + c)))/a^7 - 12*(a^2*b^2 + 5*b^4)*log(abs(b*tan(d*x + c) + a))/(a^7*b
) + (12*a^2*b^3*tan(d*x + c)^5 + 60*b^5*tan(d*x + c)^5 + 30*a^3*b^2*tan(d*x + c)^4 + 150*a*b^4*tan(d*x + c)^4
+ 22*a^4*b*tan(d*x + c)^3 + 110*a^2*b^3*tan(d*x + c)^3 + 3*a^5*tan(d*x + c)^2 + 15*a^3*b^2*tan(d*x + c)^2 - 3*
a^4*b*tan(d*x + c) + a^5)/((b*tan(d*x + c)^2 + a*tan(d*x + c))^3*a^6))/d